

/*
public class Ch06ClassAndObject {



    public static int staticVar;
    public static  Ch06ClassAndObject sins = new Ch06ClassAndObject();
    public   int insVar ;
    public static void main(String[] args) {

        Ch06ClassAndObject.staticVar = 100;
        int a = Ch06ClassAndObject.staticVar;


        Ch06ClassAndObject myobj = new Ch06ClassAndObject();
        myobj.insVar = 200;
        int b = myobj.insVar;
    }
}

*/

//example 1: new

public class Ch06ClassAndObject {

    public static void main(String[] args){
        new Ch06ClassAndObject();
    }
}



/*
public class Ch06ClassAndObject {



    public static int staticVar;
    public int instanceVar;
    public static void main(String[] args) {
        int x = 32768; // ldc
        Ch06ClassAndObject myObj = new Ch06ClassAndObject(); // new
        Ch06ClassAndObject.staticVar = x; // putstatic
        x = Ch06ClassAndObject.staticVar; // getstatic
        myObj.instanceVar = x; // putfield
        x = myObj.instanceVar; // getfield
        Object obj = myObj;
        if (obj instanceof Ch06ClassAndObject) { // instanceof
            myObj = (Ch06ClassAndObject) obj; // checkcast
            System.out.println(myObj.instanceVar);
        }
    }
}
*/